<template>
	<view>
		<view class="notice-title-box">
			<view class="notice-title">
				{{title}}
			</view>
			<view class="notice-subhead u-flex u-row-between">
				<view>
					{{creatorUser}}
				</view>
				<view>
					{{creatorTime}}
				</view>
			</view>
		</view>
		<view class="notice-content-box">
			<u-parse :html="content"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: '',
				title: '',
				creatorUser: '',
				creatorTime: ''
			}
		},
		methods: {
			
		},
		onLoad(option) {
			this.$u.api.getNotice(option.id).then(res => {
				this.content = res.bodyText
				this.title = res.title
				this.creatorUser = res.creatorUser
				this.creatorTime = this.$moment(res.creatorTime).format('YYYY-MM-DD HH:mm:ss')
			}).catch(err => {
				console.log(err)
			})
		}
	}
</script>

<style lang="scss" scoped>
	.notice-title-box {
		margin-bottom: 20rpx;
		padding: 30rpx;
		background-color: #FFFFFF;
		.notice-title {
			padding-bottom: 20rpx;
			font-size: 36rpx;
			font-weight: bold;
			color: #333333;
		}
		.notice-subhead {
			font-size: 24rpx;
			color: #999999;
		}
	}
	.notice-content-box {
		padding: 30rpx;
		background-color: #FFFFFF;
	}
</style>
